<template>
  <el-dialog title="打码预览" :visible.sync="showCode">
    <div style="text-align: center">
      <canvas ref="canvas" />
    </div>
  </el-dialog>
</template>
<script>
import Qrcode from 'qrcode'
export default {
  data() {
    return {
      showCode: false
    }
  },
  methods: {
    createCode(url) {
      Qrcode.toCanvas(this.$refs.canvas, url, {
        width: 300
      })
    }
  }
}
</script>
<style></style>
